package com.boot.springboot.pojo.dto;

import jakarta.persistence.Column;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;

public class PendingShipmentDto {
    @NotNull(message = "商品ID不能为空")
    @Min(value =100, message = "商品ID至少100以上") // 最小100（3位）
    @Max(value =10000, message = "商品ID最多10000以下") // 最大10000（5位）
    private Integer goodId;
    @NotBlank(message = "商品名不能为空")
    private String goodName;
    @NotBlank(message = "商品类别不能为空")
    private String goodCategory;
    @NotBlank(message = "商品品牌不能为空")
    private String goodBrand;
    @NotBlank(message = "商品型号不能为空")
    private String goodModel;
    @NotNull(message = "商品价格不能为空")
    @DecimalMin(value = "0.01", message = "价格必须大于0")
    private BigDecimal goodPrice;
    @NotNull(message = "商品数量不能为空")
    private Integer goodCount;
    @NotBlank(message = "商品地址不能为空")
    private String goodAddress;


    public Integer getGoodId() {
        return goodId;
    }

    public void setGoodId(Integer goodId) {
        this.goodId = goodId;
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public String getGoodCategory() {
        return goodCategory;
    }

    public void setGoodCategory(String goodCategory) {
        this.goodCategory = goodCategory;
    }

    public String getGoodBrand() {
        return goodBrand;
    }

    public void setGoodBrand(String goodBrand) {
        this.goodBrand = goodBrand;
    }

    public String getGoodModel() {
        return goodModel;
    }

    public void setGoodModel(String goodModel) {
        this.goodModel = goodModel;
    }

    public  BigDecimal getGoodPrice() {
        return goodPrice;
    }

    public void setGoodPrice(BigDecimal goodPrice) {
        this.goodPrice = goodPrice;
    }

    public Integer getGoodCount() {
        return goodCount;
    }

    public void setGoodCount(Integer goodCount) {
        this.goodCount = goodCount;
    }

    public  String getGoodAddress() {return goodAddress;}

    public void setGoodAddress(String goodAddress) {this.goodAddress = goodAddress;}

    @Override
    public String toString() {
        return "PendingShipmentDto{" +
                "goodId=" + goodId +
                ", goodName='" + goodName + '\'' +
                ", goodCategory='" + goodCategory + '\'' +
                ", goodBrand='" + goodBrand + '\'' +
                ", goodModel='" + goodModel + '\'' +
                ", goodPrice=" + goodPrice +
                ", goodCount=" + goodCount +
                ", goodAddress='" + goodAddress + '\'' +
                '}';
    }
}
